<?php
define('MICE_DIR', str_replace('\\','/', dirname(__FILE__)).'/');
define('IN_MICECMS', TRUE);

include_once  MICE_DIR.'private/config.php';
if(MICE_SETUP AND MICE_INSTSLL!=1){
	die('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title></title></head><body>网站尚未安装！请浏览  http://您的网址/install.php 即可安装</body></html>');
}

if(MICE_INISET){	//启用自定义设置的php.ini
	foreach(file(MICE_DIR.'php.ini') as $line){
		if ($line[0]=='#'){
			continue;
		}
		$p = strpos($line, '=');
		$var = trim(substr($line,0,$p));
		$val = trim(substr($line,$p+1));
		if ($val=='on'){
			$val=true;
		}elseif($val=='off'){
			$val=false;
		}
		@ini_set($var, $val);
	}
}

error_reporting(MICE_DEBUG);		//错误报告

include_once  MICE_DIR.'includes/functions.php';
include_once  MICE_DIR.'includes/adodb.php';
include_once  MICE_DIR.'classes/smarty/Smarty.class.php';

unset($_REQUEST, $HTTP_ENV_VARS, $HTTP_POST_VARS, $HTTP_GET_VARS, $HTTP_POST_FILES, $HTTP_COOKIE_VARS);
//把  $HTTP_ENV_VARS $HTTP_POST_VARS 全局变量设置为 NULL
set_magic_quotes_runtime(0); //关闭字符串转义
$magic_quotes_gpc = get_magic_quotes_gpc(); 
//magic_quotes_gpc 打开时，所有的 ' (单引号), " (双引号), \ (反斜线) and 空字符会自动加上转义符\;
if(!$magic_quotes_gpc){
	$_POST = MiceAddslashes($_POST);
	$_GET = MiceAddslashes($_GET);
}

if(MICE_GMT){
	ini_set('date.timezone',MICE_GMT);	//设置时区
}

?>